#/bin/sh 

#卸载时要保留的数据库，以防是误操作
database_path='/userdata/dgri/app/@PROJECT_NAME@/bin/egw_db-20210707.db'
#数据库暂存路径
backup_path='/userdata/dgri/data/@PROJECT_NAME@/unistall'
backup_database_path='/userdata/dgri/data/@PROJECT_NAME@/unistall/egw_db-20210707.db'

# 1 备份数据库
if [ -f $database_path ];then
    if [ ! -d "$backup_path" ]; then
        mkdir -p "$backup_path"
    fi
    cp $database_path $backup_path
    echo "$backup_database_path backup ok"
else
    echo "$database_path not exist"
fi

exit 0
